A MEMS device includes at least one mechanical element, such as a sensor, actuator, or resonator that is formed using a micromachining process that selectively etches away parts of a wafer. The wafer may include added structural layers and may be made of a semiconductor material, such as silicon. By using a semiconductor wafer, standard foundry IC processing, such as complementary metal-oxide-semiconductor (CMOS), bipolar, and bipolar CMOS (BICMOS) may be used to add electronic components, which form an IC, to create a combined MEMS device and IC on a single wafer, which includes both mechanical elements and electronic components. However, MEMS devices may be formed before or after standard foundry IC processing using high temperature oxidation, deposition, or both. Such pre-processing and post-processing steps add complexity and cost. Some MEMS devices, such as resonators, may require very fine gaps, which may be difficult to fabricate. Thus, there is a need for a fabrication method to construct a combined MEMS device and IC on a single wafer using standard foundry IC processing techniques.